<?php
use yii\helpers\Html;
use yii\helpers\Url;
use common\models\Fund;
use yii\widgets\LinkPager;
?>


  <div class="mcCont mcgCont">
 
      <div class="right moneyDetail">
        <h1 class="tt">资金明细</h1>
        <p class="tt1">可用余额： <em class="number">￥<?=Html::encode(Yii::$app->user->identity->available_money)?></em>
          <span class="btns"><!-- 
          <a href="/withdraw/charge" class="btn-small-default">充值</a>
          <a href="/withdraw" class="btn-small-empty">提现</a> -->
          </span>
        </p>
        <div class="detailCont" style="height:725px;">
          <h1 class="tt">
            <span class="tt11">事件</span>
            <span class="tt2">变动金额</span>
            <span class="tt3">时间</span>
            <span class="tt4">流水号</span>
            <span class="tt5">可用金额</span>
            <span class="tt6">备注</span>
          </h1>
          <ul class="contLists">

            <?php foreach ($fund_record as $key => $v): ?>
                <li style="height:65px;line-height:30px;">
                  <span class="tt11"><?=Html::encode(Fund::itemAlias('fund_type',$v['fund_type']))?></span>
                  <span class="tt2"><?=Html::encode($v['deal_money']<0?$v['deal_money']:'+'.$v['deal_money'])?>元</span>
                  <span class="tt3" style="color: #333"><?=Html::encode($v['create_time'])?></span>
                  <span class="tt4" style="color: #333"><?=Html::encode($v['id'])?></span>
                  <span class="tt5" style="color: #333"><?=Html::encode($v['available_money'])?></span>
                  <span class="tt6" style="color: #333" value='<?=Html::encode($v['remark'])?>'><?=Html::encode((strlen($v['remark'])>36)?mb_substr($v['remark'],0,11,'utf-8').'...':$v['remark'])?></span>
                </li>

            <?php endforeach ?>

          </ul>
        </div>
<?= LinkPager::widget([
      'pagination' => $pages,
      'maxButtonCount' => 5,
      'options' => ['class' => 'pages'], 
      'nextPageLabel' => '<span class="pageItem pageRight"><i  class="iconfont icon-right"></i></span>', 
      'prevPageLabel' => '<span class="pageItem pageLeft"><i  class="iconfont icon-left"></i></span>', 
]); ?>
      </div>
    </div>
  </div>
</div>

<style type="text/css">
  /*分页CSS修改*/
  ul.pages li a{width: 45px;display: inline-block;}
  ul.pages li{
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-size: 12px;
    height: 36px;
    width:45px;
    line-height: 36px;
    margin: 0 5px;
    text-align: center;
    vertical-align: middle;
  }
  .pages .next i{color:#333}
  .pages .prev i{color:#333}
  .pages .disabled .iconfont {color: #c3c3c3}
  .active{background:#31a900 none repeat scroll 0 0;}
  .active a{color: #fff;}
  .pages .prev{border:0;}
  .pages .next{border:0;}

  /*列表CSS修改*/
  .tt11{width: 70px;text-align: center;margin-left:-10px;}
  .tt2{width: 100px;text-align: center;margin-left:-100px;}
  .tt3{width: 130px;text-align: center;margin-left:-150px;}
  .tt4{width: 130px;text-align: center;margin-left:-290px;}
  .tt5{width: 100px;text-align: center;margin-left:565px;}
  .tt6{width: 200px;text-align: center;margin-left:672px;}
</style>
<script type="text/javascript">
  $(function(){
    $("span:contains('...')").mouseover(function(){
      var th=this;
      layer.tips($(th).attr('value'),th,{tips:[1,'#007EFF'],time: 2000});
    });
  })
</script>